<?php
return array(
	'attributeLabels' => array(
		'province' => '地区',
		'star' => '景区等级',//
//		'type' => '类型',
//		'ticket' => '门票价格',
//		'phone' => '电话',
//		'latitude' => '经纬度',
//		'traffic' => '交通信息',
	),
	'rules'=>array(
		array('image,name', 'required'),
		array('desc', 'safe'),
		array('name', 'length', 'max'=>90),
		array('address', 'length', 'max'=>150),
		array('image','file','allowEmpty'=>true,'types'=>'jpg,gif,png','maxSize'=>1024*1024*500),
		array('searchCity','safe')
	),
	
	'relations' => array(
		'items' => array(ActiveRecord::HAS_MANY, 'GoodsScenic', 'scenic_id'),
		'photo' => array(ActiveRecord::HAS_ONE, 'CompanyScenicAlbum', 'object_id'),
		'photoItems' => array(ActiveRecord::HAS_MANY, 'CompanyScenicAlbum', 'object_id'),
	),
	
	'behaviors' => array(
		'fileSaver' => array(
			'class' => 'lib.behaviors.ar.CFileSaveBehavior',
			'baseUrl' => Yii::app()->baseUrl . '/uploaded',
			'basePath' => dirname(Yii::app()->basePath) . '/uploaded',
			'attributes' => array('image'),
		),
		'fornt' => array(
			'class' => 'coms.behaviors.FrontBehavior',
			'attributes' => array(
				'title' => 'name',
				'img' => 'image',
				'desc' => 'desc',
			),
			'route' => 'provide/channel',
			'view' => 'scenicView',
		),
		'listing' => array(
	        'class' => 'app.behaviors.ListingBehavior',
	    ),
	    'companyGoods' => array(
			'class' => 'coms.behaviors.goods.CompanyGoodsBehavior',
			'modelName' => 'GoodsScenic',
	    	'companyId' => 'scenic_id'
		),
		'minprice' => array(
			'class' => 'coms.behaviors.goods.MinPriceObjBehavior',
			'modelName' => 'Scenic',
			'relatedAttr' => 'scenic_id',
		),
		'citycondtion' => array(
			'class' => 'application.behaviors.CitySearchCondition',
			'citys' => array(
				'province',
				'city',
				'district'
			),
		),
	),

	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),

);